<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>登录界面</title>
      </head>
      <script>
          window.onload=function(){
              //var form_login=document.getElementById("form_login");
              var button_sub_stuff=document.getElementById("button_sub_stuff");
              button_sub_stuff.onclick=function(){
                  var password=document.getElementById("password").value;
                  var xmlhttp;
                  if (window.XMLHttpRequest)
                  {// code for IE7+, Firefox, Chrome, Opera, Safari
                      xmlhttp=new XMLHttpRequest();
                  }
                  else
                  {// code for IE6, IE5
                      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                  }
                  xmlhttp.onreadystatechange=function()
                  {
                      if (xmlhttp.readyState==4 && xmlhttp.status==200)
                      {
                          var responseText=xmlhttp.responseText;
                          //alert(responseText);
                          localStorage.setItem("stuff",responseText);
                          window.eval("var stuff="+responseText);
                          if(password==(stuff.staffpwd)){
                              window.location="Main_Stuff.html";

                          }else{
                              sessionStorage.setItem("error","1");
                              window.location="Error.html";
                          }
                      }
                  }
                  var account=document.getElementById("account").value;

                  //xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
                  xmlhttp.open("POST","/approvalProcess/login",true);
                  xmlhttp.send(account);
              }


          }
      </script>
      <body style="width: 100%;height: 60%;">
      <div style="width: 40%;height: 60%; border-style: solid;border-color: green;margin-left: 30%;border-width: 0.1px;">
          <form action="http://localhost:8080/approvalProcess/SignIn" method="GET" id="form_login">
              <table style="margin-top: 15%;margin-left: 30%; ">
                  <tr>
                      <th>账号</th> <th><input type="text" name="account" id="account"></th>
                  </tr>
                  <tr>
                      <th>密码</th> <th><input type="password" name="password" id="password" ></th>

                  </tr>
                  <tr >
                      <th colspan="2"><input type="button" value="提交" id="button_sub_stuff"></th>
                  </tr>
              </table>
          </form>
      </div>

      </body>
</html>